/*
package com.huike.web.controller.clues;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.metadata.CellExtra;
import com.alibaba.excel.read.listener.ReadListener;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;

import java.util.List;
import java.util.Map;
import java.util.function.Consumer;

*/
/**
 * @DESCRIPTION: TODO
 * @AUTHOR 黑马程序员-孙文
 * @DATE 2022/8/2 20:47
 * @VERSION 1.0
 *//*


public class PageReadListener<T> implements ReadListener {

    */
/**
     * Single handle the amount of data
     *//*

    public static int BATCH_COUNT = 100;
    */
/**
     * Temporary storage of data
     *//*

    private List<T> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
    */
/**
     * consumer
     *//*

    private final Consumer<List<T>> consumer;

    public PageReadListener(Consumer<List<T>> consumer) {
        this.consumer = consumer;
    }

    @Override
    public void onException(Exception e, AnalysisContext analysisContext) throws Exception {

    }

    @Override
    public void invoke(Object o, AnalysisContext analysisContext) {

    }

    @Override
    public void extra(CellExtra cellExtra, AnalysisContext analysisContext) {

    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {
        if (CollectionUtils.isNotEmpty(cachedDataList)) {
            consumer.accept(cachedDataList);
        }
    }

    @Override
    public boolean hasNext(AnalysisContext analysisContext) {
        return false;
    }

    @Override
    public void invokeHead(Map map, AnalysisContext analysisContext) {

    }
}
*/
